package com.qyl.deguru.controller.customer;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.qyl.deguru.dto.Order;
import com.qyl.deguru.service.OrderService;
import com.qyl.deguru.service.impl.OrderServiceImpl;

/**
 * 订单详情页
 * */
@Controller
@RequestMapping("/customer/userOrder")
public class UserOrderController {
	OrderService orderService=new OrderServiceImpl();
	@RequestMapping("/showOrder")
	public String showOrder(int oid,ModelMap modelMap){
		List<Order> order=orderService.getOrderByUser_id(oid);
		modelMap.addAttribute("order", order);
		System.out.println(order);
		return "order";
	}
}